package com.mkait.thief.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 *  微信关键字
 * @TableName wechat_keys
 */
@TableName(value ="wechat_keys")
@Data
public class WechatKeys implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 公众号APPID
     */
    @TableField(value = "appid")
    private String appid;

    /**
     * 类型，text 文件消息，image 图片消息，news 图文消息
     */
    @TableField(value = "type")
    private String type;

    /**
     * 关键字
     */
    @TableField(value = "keys")
    private String keys;

    /**
     * 文本内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 图片链接
     */
    @TableField(value = "image_url")
    private String imageUrl;

    /**
     * 语音链接
     */
    @TableField(value = "voice_url")
    private String voiceUrl;

    /**
     * 音乐标题
     */
    @TableField(value = "music_title")
    private String musicTitle;

    /**
     * 音乐链接
     */
    @TableField(value = "music_url")
    private String musicUrl;

    /**
     * 音乐缩略图链接
     */
    @TableField(value = "music_image")
    private String musicImage;

    /**
     * 音乐描述
     */
    @TableField(value = "music_desc")
    private String musicDesc;

    /**
     * 视频标题
     */
    @TableField(value = "video_title")
    private String videoTitle;

    /**
     * 视频URL
     */
    @TableField(value = "video_url")
    private String videoUrl;

    /**
     * 视频描述
     */
    @TableField(value = "video_desc")
    private String videoDesc;

    /**
     * 图文ID
     */
    @TableField(value = "news_id")
    private Long newsId;

    /**
     * 排序字段
     */
    @TableField(value = "sort")
    private Long sort;

    /**
     * 0 禁用，1 启用
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private Long createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_at")
    private Date createAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WechatKeys other = (WechatKeys) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAppid() == null ? other.getAppid() == null : this.getAppid().equals(other.getAppid()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getKeys() == null ? other.getKeys() == null : this.getKeys().equals(other.getKeys()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getImageUrl() == null ? other.getImageUrl() == null : this.getImageUrl().equals(other.getImageUrl()))
            && (this.getVoiceUrl() == null ? other.getVoiceUrl() == null : this.getVoiceUrl().equals(other.getVoiceUrl()))
            && (this.getMusicTitle() == null ? other.getMusicTitle() == null : this.getMusicTitle().equals(other.getMusicTitle()))
            && (this.getMusicUrl() == null ? other.getMusicUrl() == null : this.getMusicUrl().equals(other.getMusicUrl()))
            && (this.getMusicImage() == null ? other.getMusicImage() == null : this.getMusicImage().equals(other.getMusicImage()))
            && (this.getMusicDesc() == null ? other.getMusicDesc() == null : this.getMusicDesc().equals(other.getMusicDesc()))
            && (this.getVideoTitle() == null ? other.getVideoTitle() == null : this.getVideoTitle().equals(other.getVideoTitle()))
            && (this.getVideoUrl() == null ? other.getVideoUrl() == null : this.getVideoUrl().equals(other.getVideoUrl()))
            && (this.getVideoDesc() == null ? other.getVideoDesc() == null : this.getVideoDesc().equals(other.getVideoDesc()))
            && (this.getNewsId() == null ? other.getNewsId() == null : this.getNewsId().equals(other.getNewsId()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateAt() == null ? other.getCreateAt() == null : this.getCreateAt().equals(other.getCreateAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAppid() == null) ? 0 : getAppid().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getKeys() == null) ? 0 : getKeys().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getImageUrl() == null) ? 0 : getImageUrl().hashCode());
        result = prime * result + ((getVoiceUrl() == null) ? 0 : getVoiceUrl().hashCode());
        result = prime * result + ((getMusicTitle() == null) ? 0 : getMusicTitle().hashCode());
        result = prime * result + ((getMusicUrl() == null) ? 0 : getMusicUrl().hashCode());
        result = prime * result + ((getMusicImage() == null) ? 0 : getMusicImage().hashCode());
        result = prime * result + ((getMusicDesc() == null) ? 0 : getMusicDesc().hashCode());
        result = prime * result + ((getVideoTitle() == null) ? 0 : getVideoTitle().hashCode());
        result = prime * result + ((getVideoUrl() == null) ? 0 : getVideoUrl().hashCode());
        result = prime * result + ((getVideoDesc() == null) ? 0 : getVideoDesc().hashCode());
        result = prime * result + ((getNewsId() == null) ? 0 : getNewsId().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateAt() == null) ? 0 : getCreateAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", appid=").append(appid);
        sb.append(", type=").append(type);
        sb.append(", keys=").append(keys);
        sb.append(", content=").append(content);
        sb.append(", imageUrl=").append(imageUrl);
        sb.append(", voiceUrl=").append(voiceUrl);
        sb.append(", musicTitle=").append(musicTitle);
        sb.append(", musicUrl=").append(musicUrl);
        sb.append(", musicImage=").append(musicImage);
        sb.append(", musicDesc=").append(musicDesc);
        sb.append(", videoTitle=").append(videoTitle);
        sb.append(", videoUrl=").append(videoUrl);
        sb.append(", videoDesc=").append(videoDesc);
        sb.append(", newsId=").append(newsId);
        sb.append(", sort=").append(sort);
        sb.append(", status=").append(status);
        sb.append(", createBy=").append(createBy);
        sb.append(", createAt=").append(createAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}